package com.example.agriculture.controller;

import com.example.agriculture.entity.ShoppingCart;
import com.example.agriculture.service.ShoppingCartService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (ShoppingCart)表控制层
 *
 * @author makejava
 * @since 2022-09-12 23:22:18
 */
@RestController
@RequestMapping("shoppingCart")
public class ShoppingCartController {
    /**
     * 服务对象
     */
    @Resource
    private ShoppingCartService shoppingCartService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public ShoppingCart selectOne(Integer id) {
        return this.shoppingCartService.queryById(id);
    }

}